<?php
	
	function send_validcode($phone,$info)
	{
		$tempid = 'SMS_49965131';
		post_dayu($phone,$info,$tempid,'比赚科技');
	}
	
	function send_fanli_ok($phone,$info)
	{
		$tempid = 'SMS_56770003';
		post_dayu($phone,$info,$tempid,'比赚科技');
	}
	
	function send_fanli_fail($phone,$info)
	{
		$tempid = 'SMS_57390194';
		post_dayu($phone,$info,$tempid,'比赚科技');
	}
	
	function send_tixian_ok($phone,$info)
	{
		$tempid = 'SMS_57425214';
		post_dayu($phone,$info,$tempid,'比赚科技');
	}
	
	
	function post_dayu($moblie,$content=array(),$tempid,$sign='伏蒙商务')
	{
		require_once ROOTDIR . 'source/third/alidayu/TopClient.php';
		require_once ROOTDIR . 'source/third/alidayu/AlibabaAliqinFcSmsNumSendRequest.php';
		require_once ROOTDIR . 'source/third/alidayu/ResultSet.php';
		require_once ROOTDIR . 'source/third/alidayu/RequestCheckUtil.php';
		require_once ROOTDIR . 'source/third/alidayu/TopLogger.php';
		
		
		if(!empty($moblie) && !empty($content) && !empty($tempid))
		{
			$c = new TopClient;
			$c->appkey = DAYU_Key;
			$c->secretKey = DAYU_Secret;

			$req = new AlibabaAliqinFcSmsNumSendRequest;
			$req->setSmsType("normal");
			$req->setSmsFreeSignName($sign);
			$req->setSmsParam(json_encode($content));
			$req->setRecNum($moblie);
			$req->setSmsTemplateCode($tempid);
			$resp = $c->execute($req);
		}
		
	}